package student;

import java.io.FileNotFoundException;
import java.util.HashMap;

import student.gui.MainWindow;
import student.world.*;

public class Initializer {

	/**
	 * Constructs a CritterWorld and a MainWindow to display it.
	 * Requires: a file "constants.txt" in the local directory
	 * containing the appropriate constants
	 */
	public static void main(String[] args) {
		CritterWorld world = null;
		try {
			world = new CritterWorld("constants.txt");
		} catch (FileNotFoundException e) {
			System.out.println(e.getMessage());
			System.exit(0);
		} catch (NullPointerException e) {
			System.out.println("Not all of the constants required were found.");
			System.exit(0);
		}
		MainWindow view = new MainWindow(world);
	}

}
